home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cocktail / reuse.lha / reuse / c / IdentsDrv.c < prev    next >
C/C++ Source or Header  |  1992-08-18  |  600b  |  31 lines

  1. static char rcsid [] = "$Id: IdentsDrv.c,v 1.3 1992/05/05 13:19:05 grosch rel $";
  2.  
  3. # include <stdio.h>
  4. # include "Idents.h"
  5.  
  6. extern int strlen ();
  7.  
  8. static void loop ()
  9. {
  10.    char string [256];
  11.    tIdent ident;
  12.  
  13.    (void) printf ("enter strings, one per line, - terminates\n");
  14.    do {
  15.       (void) scanf ("%s", string);
  16.       ident = MakeIdent (string, strlen (string));
  17.       WriteIdent (stdout, ident);
  18.       (void) printf ("\n");
  19.    } while (string [0] != '-' || string [1] != '\0');
  20.    (void) printf ("\n");
  21.    WriteIdents ();
  22. }
  23.  
  24. main ()
  25. {
  26.    loop ();
  27.    InitIdents ();
  28.    loop ();
  29.    return 0;
  30. }
  31.